package com.xiaoshuidi.cloud.module.iot.service;


import com.github.pagehelper.PageInfo;
import com.xiaoshuidi.cloud.module.iot.api.device.vo.AddPasswordModelVo;
import com.xiaoshuidi.cloud.module.iot.common.ResultModel;
import com.xiaoshuidi.cloud.module.iot.dal.model.doorLock.*;

import java.util.List;

/**
 * <br>
 *
 * @author Porter
 * create by 2019/6/27
 * @Emial Porter.Wang@ixiaoshuidi.com
 */
public interface DoorLockService {

    /**
     * 开门记录
     *
     * @param doorLockReportReqVO
     * @return
     */
    ResultModel<PageInfo<DoorLockReportRespVO>> getOpenDoorRecord( DoorLockReportReqVO doorLockReportReqVO);

    /**
     * 门锁操作记录
     *
     * @param doorLockReportReqVO
     * @return
     */
    ResultModel<PageInfo<DoorLockOperationRecord>> getOperationRecord( DoorLockReportReqVO doorLockReportReqVO);

    /**
     * 门锁详情
     *
     * @param deviceNo
     * @return
     */
    ResultModel<DoorLockInfo> getDoorlockInfo( String deviceNo);

    /**
     * 门锁刷新
     *
     * @param deviceNo
     * @return
     */
    ResultModel<DoorLockInfo> refreshDoorLoclInfo( String deviceNo) throws Exception;

    ResultModel<AddPasswordModel> frozenPassword(AddPasswordModel addPasswordModel) throws Exception;

    /**
     * 解冻密码
     *
     * @param addPasswordModel
     * @return
     */
    ResultModel<AddPasswordModel> unfrozenPassword(AddPasswordModel addPasswordModel) throws Exception;

    /**
     * 删除密码
     *
     * @param addPasswordModel
     * @return
     */
    ResultModel<AddPasswordModelVo> deletePassword(AddPasswordModelVo addPasswordModel) throws Exception;

    /**
     * 修改密码（在线）
     *
     * @param addPasswordModel
     * @return
     */
    ResultModel<AddPasswordModel> updatePassword(AddPasswordModel addPasswordModel) throws Exception;


    /**
     * 下发密码
     *
     * @param addPasswordModel
     * @return
     */
    ResultModel<AddPasswordModel> addPassword(AddPasswordModel addPasswordModel) throws Exception;

    /**
     * 门锁密码列表
     *
     * @param deviceNo
     * @return
     */
    ResultModel<List<AddPasswordModel>> getPasswordList(String deviceNo,String mobile);
}
